﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CCWin;
using ModbusTest.Config;

namespace ModbusTest
{
    public partial class FrmLogin :Skin_VS
    {
        ModuleConfigContainer _cfgs = ModulesConfigTool.Load();
        public FrmLogin()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void FrmLogin_Load(object sender, EventArgs e)
        {
            var s = from a in _cfgs.Modules select a.Name;
            this.comboBox1.DataSource = s.ToList();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            frmMain frm = new frmMain(this.comboBox1.Items[this.comboBox1.SelectedIndex].ToString());
            frm.Show();
            this.Hide();
        }
    }
}
